package com.dongjiantong.quarantine.serviceImpl;

import com.dongjiantong.mybatis.BaseService;
import com.dongjiantong.quarantine.model.DjtBreedReports;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

/**
 * Created by mz on 13/11/17.
 *
 */
public interface DjtBreedReportsReadService extends BaseService<DjtBreedReports>{

    /**
     *根据id查询单据
     * @param id 单据ID
     * @return DjtBreedReports
     */
    DjtBreedReports findById(Long id);

    /**
     * 养殖端的分页查询
     * @param pageNum 页码
     * @param pageSize 每页条数
     * @param map 参数
     * @return PageInfo<DjtBreedReports>
     */
    PageInfo<DjtBreedReports> pagingForFarm(Integer pageNum,Integer pageSize, Map<String , Object> map);

    /**
     * 政府端的分页查询
     * @param pageNum 页码
     * @param pageSize 每页条数
     * @param map 参数
     * @return PageInfo<DjtBreedReports>
     */
    PageInfo<DjtBreedReports> pagingForGOV(Integer pageNum,Integer pageSize,Map<String , Object> map);

    /**
     * 获取当前单据状态
     * @param id 单据主键id
     * @return Integer status
     */
    Integer findStatusById(Long id);

    PageInfo<DjtBreedReports> pagingForWeb(Integer pageNum, Integer pageSize, Map<String, Object> map);

    List<Map<String,Object>> applyTop10ByArea(Map<String, Object> map);

    List<Map<String,Object>> applyTop10ByApplyStation(Map<String, Object> map);

    List<Map<String,Object>> findSumByIsToLocal(Map<String, Object> map);

    Map<String,Object> findSumForWebDataAnalysis(Map<String, Object> map);

    List<Map<String,Object>> sumGroupByReceive(Map<String, Object> map);

    List<Map<String,Object>> sumGroupByDeliver(Map<String, Object> map);

    List<Map<String,Object>> findSumByIsToLocalAndMonth(Map<String, Object> map);

    Map<String,Object> findSumForWebDataAnalysisAndMonth(Map<String, Object> map);

    Map<String,Object> selectSum(Map<String , Object> map);

}
